package com.cs.framework.ui.bo;

import java.util.List;

import javax.persistence.MappedSuperclass;
import javax.persistence.Transient;

import com.cs.framework.common.bo.BoBase;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;

/**
 * 菜单
 * 
 * @author hedongzhou
 * 
 */
@MappedSuperclass
public class Menu extends BoBase {

	private static final long serialVersionUID = 4031827508086241470L;

	/**
	 * 文本描述
	 */
	protected String text;

	/**
	 * 是否为子节点
	 */
	protected String leaf;

	/**
	 * 是否自动展开
	 */
	protected String expanded;

	/**
	 * 是否多选框选中
	 */
	@Transient
	protected String checked;

	/**
	 * 子菜单
	 */
	@JsonInclude(Include.NON_NULL)
	@Transient
	protected List<? extends Menu> children;

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public String getLeaf() {
		return leaf;
	}

	public void setLeaf(String leaf) {
		this.leaf = leaf;
	}

	public String getExpanded() {
		return expanded;
	}

	public void setExpanded(String expanded) {
		this.expanded = expanded;
	}

	public List<? extends Menu> getChildren() {
		return children;
	}

	public void setChildren(List<? extends Menu> children) {
		this.children = children;
	}

	public String getChecked() {
		return checked;
	}

	public void setChecked(String checked) {
		this.checked = checked;
	}

}
